﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="EnterCompanyDetail.aspx.cs" Inherits="Auditors_EnterCompanyDetail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
     <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script>
        function GoTotxtAmount() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=txtAmount.ClientID %>").focus();

            }
        }
        function GoTodropCurrency() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {


                $("#<%=dropCurrency.ClientID %>").focus();

            }
        }

        function ButtonPostBack() {
            var oEvent = window.event;
            if (oEvent.keyCode == 13 && !oEvent.ctrlKey) {
                __doPostBack($("#<%=Button2.ClientID %>").attr("name"), '');
            }
        }
        
        function GoTo(page, id, orderid) {
            window.location.href = page + "?CompanyID=" + id + "&orderid=" + orderid;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridView1_RowDataBound"
            DataKeyNames="tempId" OnRowDeleting="GridView1_RowDeleting">
            <Columns>
                <asp:BoundField DataField="date" HeaderText="时间" SortExpression="date" />
                <asp:BoundField DataField="DetailTypesId" HeaderText="类型" SortExpression="DetailTypesId" />
                <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" />
                <asp:CommandField ShowDeleteButton="True" />
            </Columns>
        </asp:GridView>
    </div>
    <table id="myTable">
        <tr>
            <td>
                时间
            </td>
            <td>
                <asp:TextBox ID="txtDate" runat="server" onkeydown="GoTotxtAmount();"></asp:TextBox>
            </td>
            <td>
                金额
            </td>
            <td>
                <asp:TextBox ID="txtAmount" runat="server" onkeydown="GoTodropCurrency();"></asp:TextBox>
            </td>
            <td>
                类型
            </td>
            <td>
                <asp:DropDownList ID="dropCurrency" runat="server" onkeydown="ButtonPostBack();">
                </asp:DropDownList>
            </td>
            <td>
                <asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button2_Click" UseSubmitBehavior="false" />
            </td>
        </tr>
    </table>
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click"  UseSubmitBehavior="false"/>
    <input type="button" value="添加类型" onclick='GoTo("DetailTypes.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderID"]%>");' />
</asp:Content>
